#include "../source/uri.h"
#include <iostream>

int main(void)
{
    framework::Uri::ptr uri = framework::Uri::Create("http://admin@www.baidu.com/test/中文/uri?id=100&name=sylar&vv=中文#frg中文");
    


    std::cout << uri->getScheme() << std::endl;
    std::cout << uri->getUserinfo() << std::endl;
    std::cout << uri->getHost() << std::endl;
    std::cout << uri->getPath() << std::endl;
    std::cout << uri->getQuery() << std::endl;
    std::cout << uri->getFragment() << std::endl;
    std::cout << uri->getPort() << std::endl;

    std::cout << uri->toString() << std::endl;
    auto addr = uri->createAddress();
    std::cout << *addr << std::endl;

    return 0;
}